/*-----------------------------------------------------------------------------
 * 
 *
 *-----------------------------------------------------------------------------
 */

#include "server/include/stock_server_update_process.h"
#include "server/include/stock_server_queue.h"
#include "server/database/include/stock_database.h"
#include "server/include/stock_server_transaction.h"
#include "server/analysis/include/stock_analysis.h"

pthread_t stock_server_update_process_thread;


stock_server_update_stats_t stock_server_update_stats;



void *
stock_server_update_process(void *args)
{
    stock_update *update;

    stock_database_init();

    memset(&stock_server_update_stats, 0, sizeof(stock_server_update_stats_t));

    while (1) {

        update = stock_server_dequeue();

        stock_database_insert(update);

    }

    return NULL;
}
